import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

const router = new VueRouter({
    mode: 'history',
    routes: [{
            path: '',
            redirect: '/home',
        }, {
            path: '/',
            name: 'Main',
            component: () =>
                import ("../src/views/Main.vue"),
            children: [
                // {
                //     path: '/home',
                //     name: 'home',
                //     component: () =>
                //         import ("../src/views/Home.vue"),
                // },
                // {
                //     path: '/user',
                //     name: 'user',
                //     component: () =>
                //         import ('../src/views/User.vue')
                // },
                // {
                //     path: '/mall',
                //     name: 'mall',
                //     component: () =>
                //         import ('../src/views/Mall.vue')
                // },
                // {
                //     path: '/otherPage1',
                //     name: 'otherPage1',
                //     component: () =>
                //         import ('../src/views/otherPage1.vue')
                // },
                // {
                //     path: '/otherPage2',
                //     name: 'otherPage2',
                //     component: () =>
                //         import ('../src/views/otherPage2.vue')
                // },
            ]
        },
        {
            path: '/login',
            name: 'login',
            component: () =>
                import ('../src/views/login.vue')
        }
    ]
})

export default router